﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true"
    CodeBehind="wFrmRelacionarArticuloActualizar.aspx.cs" Inherits="Crosland.Automotriz.Web.wFrmRelacionarArticuloActualizar" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
    <script type="text/javascript">
        function soloNumero(e) {
            key = e.keyCode || e.which;
            tecla = String.fromCharCode(key).toLowerCase();
            letras = "0123456789";
            especiales = [32];
            tecla_especial = false
            for (var i in especiales) {
                if (key == especiales[i]) {
                    tecla_especial = true;
                    break;
                }
            }

            if (letras.indexOf(tecla) == -1 && !tecla_especial) {
                return false;
            }
        }
    </script>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <table>
                <tr>
                    <td>
                        <dx:ASPxButton ID="btnGrabar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                            CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                            Text="Grabar" OnClick="btnGrabar_Click" AutoPostBack="False">
                        </dx:ASPxButton>
                    </td>
                    <td>
                        <dx:ASPxButton ID="btnSalir" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                            CssPostfix="Office2010Blue" OnClick="btnSalir_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                            Text="Salir" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {

}" />
                        </dx:ASPxButton>
                    </td>
                </tr>
            </table>
            <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="70%" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                CssPostfix="Office2010Blue" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px"
                GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                </HeaderStyle>
                <PanelCollection>
                    <dx:PanelContent ID="PanelContent3" runat="server" SupportsDisabledAttribute="True">
                        <table>
                            <tr>
                                <td>
                                    &nbsp;<asp:Label ID="Label1" runat="server" ForeColor="#3399FF" Text="Codigo Principal:"
                                        BorderStyle="None" Width="100px"></asp:Label>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtcodigoMaestro" runat="server" Width="180px" ClientEnabled="False"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtDescripcionMaterialMae" runat="server" Width="300px" ClientEnabled="False"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnAbrirPopup1" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="..." Width="100px" OnClick="btnAbrirPopup1_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server" Width="70%" HeaderText=""
                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px"
                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                </HeaderStyle>
                <PanelCollection>
                    <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="Codigo Secundario:" ForeColor="#3399FF"
                                        BorderStyle="None" Width="100px"></asp:Label>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtCodigoSustituto" runat="server" Height="23px" Width="180px"
                                        ReadOnly="True">
                                        <ValidationSettings ErrorText="Valor inv&#225;lido">
                                            <RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular">
                                            </RegularExpression>
                                        </ValidationSettings>
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtDescripcionMaterialSustituto" runat="server" Height="20px"
                                        ReadOnly="True" Width="300px">
                                        <ValidationSettings ErrorText="Valor inv&#225;lido">
                                            <RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular">
                                            </RegularExpression>
                                        </ValidationSettings>
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnAbrirPopup2" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="..." Width="100px" OnClick="btnAbrirPopup2_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:Label ID="Label3" runat="server" BorderStyle="None" Text="Tipo Relacion&nbsp;"
                                            ForeColor="#3399FF" Width="100px"></asp:Label>
                                </td>
                                <td>
                                    <dx:ASPxComboBox ID="cboTipoRelacion" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Height="24px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="180px">
                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        </LoadingPanelImage>
                                        <LoadingPanelStyle ImageSpacing="5px">
                                        </LoadingPanelStyle>
                                        <ButtonStyle Width="13px">
                                        </ButtonStyle>
                                        <ValidationSettings ErrorText="Valor inv&#225;lido">
                                            <RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular">
                                            </RegularExpression>
                                        </ValidationSettings>
                                    </dx:ASPxComboBox>
                                </td>
                                <td>
                                    <span style="color: #3399FF; border-left-color: #A0A0A0; border-right-color: #C0C0C0;
                                        border-top-color: #A0A0A0; border-bottom-color: #C0C0C0; padding: 1px">Cantidad:</span><dx:ASPxTextBox
                                            ID="txtCantidad" runat="server" Height="16px" Width="100px" onkeypress="return soloNumero(event)"
                                            MaxLength="4" Style="text-align: right; float: right" Text="1">
                                            <MaskSettings ErrorText="Solo se acepta numeros enteros" />
                                            <ValidationSettings ErrorText="Valor inv&#225;lido">
                                                <RegularExpression ErrorText="Fall&#243; la validaci&#243;n de expresi&#243;n Regular">
                                                </RegularExpression>
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnActualizar" runat="server" OnClick="btnActualizar_Click" Text="Actualizar"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        Height="23px" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="100px" ClientVisible="False">
                                    </dx:ASPxButton>
                                    <dx:ASPxButton ID="btnAgregar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" OnClick="btnAgregar_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="Agregar" Width="100px">
                                    </dx:ASPxButton>
                                    <br />
                                </td>
                            </tr>
                        </table>
                        <table style="width: 100%;">
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" ForeColor="#3399FF" Text="Comentario :">
                                    </dx:ASPxLabel>
                                </td>
                                <td align="left">
                                    <dx:ASPxMemo ID="txtComentario" runat="server" Height="71px" Width="100%" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    </dx:ASPxMemo>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <dx:ASPxGridView ID="gvdata" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Width="100%" KeyFieldName="ID_MATERIAL_SUS" OnFocusedRowChanged="gvdata_FocusedRowChanged"
                                        EnableCallBacks="False">
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="ID_MATERIAL_SUS" ShowInCustomizationForm="True"
                                                Visible="False" VisibleIndex="1">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Cod.secundario" FieldName="COD_MATERIAL_SUS"
                                                ShowInCustomizationForm="True" ToolTip="Código sustituto" VisibleIndex="2" Width="80px">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Tipo relacion" FieldName="DE_TIPO_SUS" ShowInCustomizationForm="True"
                                                VisibleIndex="3" Width="80px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="ID_SUS_ART_MAE" ShowInCustomizationForm="True"
                                                Visible="False" VisibleIndex="4">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Cantidad" FieldName="CANTIDAD" ShowInCustomizationForm="True"
                                                VisibleIndex="5" Width="50px">
                                                <PropertiesTextEdit DisplayFormatString="{0:N0}">
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Descripcion" FieldName="DES_MATERIAL_SUS" ShowInCustomizationForm="True"
                                                VisibleIndex="6" Width="200px">
                                                <PropertiesTextEdit DisplayFormatString="{0:N0}">
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Comentario" FieldName="OBSERVACION" ShowInCustomizationForm="True"
                                                VisibleIndex="7" Width="150px">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior ProcessFocusedRowChangedOnServer="True" AllowFocusedRow="True" />
                                        <SettingsLoadingPanel Text="Cargando&amp;hellip;" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                            <ProgressBar Height="21px">
                                            </ProgressBar>
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtIdMaterialMaestro" runat="server" ClientVisible="False" Width="170px">
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtIdmaterialSustituto" runat="server" ClientVisible="False"
                                        Width="170px">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                        </table>
                    </dx:PanelContent>
                </PanelCollection>
            </dx:ASPxRoundPanel>
            <dx:ASPxPopupControl ID="PopupBuscarArticulos" runat="server" Width="733px" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                CssPostfix="PlasticBlue" EnableViewState="False" HeaderText="Buscar Articulos"
                LoadingPanelText="Cargando&amp;hellip;" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" AllowDragging="True"
                CloseAction="CloseButton" Modal="True" ClientInstanceName="PopupBuscarArticulos">
                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                </LoadingPanelImage>
                <CloseButtonStyle>
                    <Paddings Padding="0px" />
                </CloseButtonStyle>
                <ContentStyle>
                    <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                </ContentStyle>
                <HeaderStyle>
                    <Paddings PaddingLeft="10px" PaddingBottom="4px" PaddingRight="4px" PaddingTop="4px" />
                </HeaderStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                        <br />
                        <dx:ASPxPanel ID="Panel2" runat="server" DefaultButton="btCreate">
                            <PanelCollection>
                                <dx:PanelContent runat="server">
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtBuscar" runat="server" Height="16px" Width="308px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" 
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                                    NullText="Ingrese (Código,Descripción o Modelo) ">
                                                    <Paddings Padding="5px" />
                                                    <ValidationSettings>
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnBuscarPopup" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" OnClick="btnBuscarPopup_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Buscar" AutoPostBack="False">
                                                    <Paddings Padding="4px" />
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                Mostrar los primeros&nbsp;&nbsp;
                                            </td>
                                            <td>
                                                <dx:ASPxComboBox ID="cboopcion" runat="server" SelectedIndex="0" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" Spacing="0" 
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="50px">
                                                    <Items>
                                                        <dx:ListEditItem Text="100" Value="100" Selected="True" />
                                                        <dx:ListEditItem Text="200" Value="200" />
                                                    </Items>
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <Paddings Padding="4px" />
                                                    <ValidationSettings>
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td>
                                                Registros
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td align="right" bgcolor="White">
                                                <dx:ASPxLabel ID="ASPxLabel2" runat="server" BackColor="White" 
                                                    Font-Names="Calibri" Font-Size="13pt" ForeColor="#3366CC" RightToLeft="False" 
                                                    Text="Stock actualizado al : ">
                                                </dx:ASPxLabel>
                                            </td>
                                            <td colspan="6">
                                                <dx:ASPxLabel ID="lblStockActualizado" runat="server" BackColor="White" 
                                                    Font-Names="Calibri" Font-Size="12pt" ForeColor="#3366CC" Width="100%">
                                                </dx:ASPxLabel>
                                            </td>
                                        </tr>
                                    </table>
                                    <dx:ASPxGridView ID="grdArticulos" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" KeyFieldName="COD_MATERIAL" Width="801px" OnAfterPerformCallback="grdArticulos_AfterPerformCallback"
                                        OnPageIndexChanged="grdArticulos_PageIndexChanged">
                                        <Columns>
                                            <dx:GridViewDataTextColumn Caption="Código" FieldName="COD_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="2" ToolTip="Codigo material" Width="150px">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Descripción" FieldName="DES_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="3" ToolTip="Descripción material" Width="300px">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" ShowInCustomizationForm="True"
                                                VisibleIndex="4" Width="120px">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="ID_MATERIAL" ShowInCustomizationForm="True"
                                                Visible="False" VisibleIndex="1">
                                                <PropertiesTextEdit>
                                                    <ValidationSettings ErrorText="Valor inválido">
                                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                                    </ValidationSettings>
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Alm. C" FieldName="ALMACEN_C" ShowInCustomizationForm="True"
                                                VisibleIndex="6" Width="100px">
                                                <PropertiesTextEdit DisplayFormatString="{0:#,##0}">
                                                </PropertiesTextEdit>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <CellStyle HorizontalAlign="Center">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Alm. Gral." FieldName="ALMACEN_GENERAL" ShowInCustomizationForm="True"
                                                VisibleIndex="5" Width="100px">
                                                <PropertiesTextEdit DisplayFormatString="{0:#,##0}">
                                                </PropertiesTextEdit>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <CellStyle HorizontalAlign="Center">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior AllowFocusedRow="True" />
                                        <SettingsPager PageSize="200" EllipsisMode="OutsideNumeric">
                                            <AllButton Text="All">
                                            </AllButton>
                                            <NextPageButton Text="Next &gt;">
                                            </NextPageButton>
                                            <PrevPageButton Text="&lt; Prev">
                                            </PrevPageButton>
                                        </SettingsPager>
                                        <Settings ShowVerticalScrollBar="True" />
                                        <SettingsLoadingPanel Text="Cargando&amp;hellip;" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                            <ProgressBar Height="21px">
                                            </ProgressBar>
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                    <br />
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <dx:ASPxButton ID="btnaceptar" runat="server" Text="Aceptar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    OnClick="btnaceptar_Click" AutoPostBack="False">
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btncancelar" runat="server" AutoPostBack="False" Text="Cancelar"
                                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                    <ClientSideEvents Click="function(s, e) {
	PopupBuscarArticulos.Hide();
}" />
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </dx:PanelContent>
                            </PanelCollection>
                        </dx:ASPxPanel>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
            <dx:ASPxPopupControl ID="popupmsj" runat="server" AllowDragging="True" ClientInstanceName="popupmsj"
                CloseAction="CloseButton" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                CssPostfix="PlasticBlue" EnableViewState="False" HeaderText="Mensaje" LoadingPanelText="Cargando&amp;hellip;"
                Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                </LoadingPanelImage>
                <CloseButtonStyle>
                    <Paddings Padding="0px" />
                </CloseButtonStyle>
                <ContentStyle>
                    <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                </ContentStyle>
                <HeaderStyle>
                    <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" PaddingTop="4px" />
                </HeaderStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" SupportsDisabledAttribute="True">
                        <br />
                        <dx:ASPxPanel ID="ASPxPanel2" runat="server" DefaultButton="btCreate">
                            <PanelCollection>
                                <dx:PanelContent ID="Panelpopup" runat="server">
                                    <table style="width: 100%;">
                                        <tr>
                                            <td style="width: 100%;" align="center">
                                                <asp:Label ID="lblMsj" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td style="width: 100%;" align="center">
                                                <dx:ASPxButton ID="ASPxButton1" runat="server" Text="Aceptar" AutoPostBack="False"
                                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="10px">
                                                    <ClientSideEvents Click="function(s, e) {
	popupmsj.Hide();
}" />
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </dx:PanelContent>
                            </PanelCollection>
                        </dx:ASPxPanel>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
